<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    xxxx 对对对<br />
    男男女女女女女女女
    <div class="father">
      <div class="a"></div>
      <div class="b"></div>
      <div class="c"></div>
    </div>

    <style>
      .father {
        width: 300px;
        height: 400px;
        border: solid 2px red;
        position: relative;
      }
      .a {
        width: 30px;
        height: 40px;
        background-color: blanchedalmond;
        position: absolute;
        left: 10px;
        top: 20px;
      }
      .b {
        width: 30px;
        height: 30px;
        background-color: blue;
        position: absolute;
        left: 60px;
        top: 0;
      }
      .c {
        width: 50px;
        height: 40px;
        background-color: green;
        position: absolute;
        left: 160px;
        top: 0;
      }
    </style>

    <div class="f">
      <div class="s"></div>
    </div>
    <style>
      .f {
        width: 200px;
        height: 300px;
        border: solid 2px red;
        position: relative;
      }
      .s {
        width: 20px;
        height: 40px;
        background-color: yellow;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
      }
    </style>
  </body>
</html>
